package com.hngates.architecture.service.impl;

import java.util.List;
import com.hngates.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hngates.architecture.mapper.ArcWorkerComplainMapper;
import com.hngates.architecture.domain.ArcWorkerComplain;
import com.hngates.architecture.service.IArcWorkerComplainService;
import com.hngates.common.core.text.Convert;

/**
 * 工人投诉具体情况Service业务层处理
 * 
 * @author jwhe
 * @date 2022-07-05
 */
@Service
public class ArcWorkerComplainServiceImpl implements IArcWorkerComplainService 
{
    @Autowired
    private ArcWorkerComplainMapper arcWorkerComplainMapper;

    /**
     * 查询工人投诉具体情况
     * 
     * @param id 工人投诉具体情况主键
     * @return 工人投诉具体情况
     */
    @Override
    public ArcWorkerComplain selectArcWorkerComplainById(Long id)
    {
        return arcWorkerComplainMapper.selectArcWorkerComplainById(id);
    }

    /**
     * 查询工人投诉具体情况列表
     * 
     * @param arcWorkerComplain 工人投诉具体情况
     * @return 工人投诉具体情况
     */
    @Override
    public List<ArcWorkerComplain> selectArcWorkerComplainList(ArcWorkerComplain arcWorkerComplain)
    {
        return arcWorkerComplainMapper.selectArcWorkerComplainList(arcWorkerComplain);
    }

    /**
     * 新增工人投诉具体情况
     * 
     * @param arcWorkerComplain 工人投诉具体情况
     * @return 结果
     */
    @Override
    public int insertArcWorkerComplain(ArcWorkerComplain arcWorkerComplain)
    {
        arcWorkerComplain.setCreateTime(DateUtils.getNowDate());
        return arcWorkerComplainMapper.insertArcWorkerComplain(arcWorkerComplain);
    }

    /**
     * 修改工人投诉具体情况
     * 
     * @param arcWorkerComplain 工人投诉具体情况
     * @return 结果
     */
    @Override
    public int updateArcWorkerComplain(ArcWorkerComplain arcWorkerComplain)
    {
        arcWorkerComplain.setUpdateTime(DateUtils.getNowDate());
        return arcWorkerComplainMapper.updateArcWorkerComplain(arcWorkerComplain);
    }

    /**
     * 批量删除工人投诉具体情况
     * 
     * @param ids 需要删除的工人投诉具体情况主键
     * @return 结果
     */
    @Override
    public int deleteArcWorkerComplainByIds(String ids)
    {
        return arcWorkerComplainMapper.deleteArcWorkerComplainByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除工人投诉具体情况信息
     * 
     * @param id 工人投诉具体情况主键
     * @return 结果
     */
    @Override
    public int deleteArcWorkerComplainById(Long id)
    {
        return arcWorkerComplainMapper.deleteArcWorkerComplainById(id);
    }
}
